Time division multiplexing (TDM) is a mechanism commonly used for sharing resources on a communication link. Consider for example a single cable connecting multiple voice or data channels between call switches. The link is divided in time into successive frames of equal duration. Each frame is further sub-divided in time into a sequence of slots (numbered 0 to n), where each slot can accommodate 8 bits. The number of slots in a frame is determined by the data rate of the link and the duration of the frame. Multiple channels are formed on a data stream by allocating respective slot numbers to channels. Thus, a first channel (CH0) is formed from the set of first slots in successive frames, a second channel (CH1) is formed from the set of second slots in successive frames, etc.
Data is provided to a TDM serial data transmitter from a source (referred to hereinafter as an “external” memory because it does not form part of the serial data transmitter per se). Data is temporarily stored at the serial data transmitter in a set of data queues, one for each “context”. Each context comprises a plurality of buffers (e.g. three). FIG. 1 illustrates schematically the architecture of a part of a TDM serial data transmitter. A TDM interface 1 provides data requests at regular intervals to a context lookup table 2. The lookup table maintains a mapping between TDM channel numbers and “context” numbers. The lookup table 2 cycles through the contexts as data requests are received, and passes context numbers to a data cache 3. The next data block in the identified context is read from the appropriate buffer and passed to the TDM interface. When a buffer belonging to a context is empty, a refill request is made via a memory interface 4 to the external memory 5. For a given context, one, two, or three buffers may be empty at a given time, in which case a corresponding number of buffer fill requests are outstanding.
The following table shows an example lookup table for a serial stream having 24 channels, and making use of 7 contexts:
TDM01234567891011121314151617181920212223ChannelContext123456777777777777777777Number
In this example, channels 0 to 5 are mapped onto context numbers 1 to 7, whilst channels 6 to 23 are all mapped to context 7. It will be appreciated that the buffers of context 7 will be emptied at a much higher rate than those of contexts 1 to 6. This may give rise to problems in refilling the buffers of context 7 at a high enough rate. This is because the data cache 3 and memory interface 4 treat all context refill requests with equal priority. In a worst case scenario, and using the above example, buffers of context 1 to 6 are empty and refill requests made, when one or more buffers of context 7 becomes empty. If the refill request for context 7 is not satisfied quickly enough, the entire context may be emptied so that there is no data available for channels 6 to 23. This causes a break in the data transmitted over the TDM link which is not permitted.